<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        输入的值：
        <input type="text" v-model="message">
        <!-- 使用方法实现计算属性功能 -->
        {{reverseMsg()}}
    </div>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                message: "hello vue"
            },
            methods: {
                reverseMsg: function () {
                    return this.message.split("").reverse().join("");
                }

            }
        })
    </script>
</body>

</html>